import Vue from "vue";
import App from "./App.vue";
import Element from "element-ui";
import layer from "vue-layer";
import Vant from 'vant';
import jquery from "jquery";
import store from "@/store";
import router from "@/router";
import echarts from "echarts";
import i18n from './lang' // internationalization
const pf = require('./utils/pf').default
import indexJs from "./plugin/index";
import {arrayToMap, getPropertyList, isAuth, ListToTree, setUrl, treeDataTranslate} from "./utils/index.js";

import "element-ui/lib/theme-chalk/index.css";
import "vue-layer/lib/vue-layer.css"; 
import 'vant/lib/index.css';
import '@/assets/scss/common.scss';
import '@/assets/scss/font.scss';
import '@/assets/scss/home.scss';
import '@/assets/scss/index.scss';

 

window.jquery = window.$ = jquery;
Vue.prototype.$echarts = echarts;
Vue.prototype.isAuth = isAuth; // 权限方法
Vue.prototype.treeDataTranslate = treeDataTranslate;
Vue.prototype.arrayToMap = arrayToMap;
Vue.prototype.ListToTree = ListToTree;
Vue.prototype.getPropertyList = getPropertyList;
Vue.prototype.$layer = layer(Vue);
Vue.prototype.setUrl = setUrl;

Vue.config.productionTip = false;
import plugin from './plugin/index';  
Vue.use(plugin) 
Vue.use(indexJs)
Vue.use(Vant)
Vue.use(Element, {
    size: pf.storageGet('size') || 'small', // set element-ui default size
    i18n: (key, value) => i18n.t(key, value)
  })

// 添加实例属性
Object.assign(Vue.prototype, {
  pf, // 公共方法
})

new Vue({
    router,
    store,
    i18n,
    render: h => h(App),
}).$mount("#app");
